package com.company;

import java.util.Objects;

public class Person {

	private String name = null;
	private int age = 0;

	public Person(String name, int age) {
		this.name = name;
		this.age = age;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (!(o instanceof Person)) return false;
		Person person = (Person) o;
		return age == person.age && name.equals(person.name);
	}

	@Override
	public int hashCode() {
		return Objects.hash(name, age);
	}

	public Person() {

	}

	public String getName() {
		return name;
	}

	public int getAge() {
		return age;
	}

	@Override
	public String toString() {
		return "(Person: " + name + ", " + age + ")";
	}
}
